<?php
namespace app\admin\controller;
/**
 * 仪器控制器
 */
class Class extends AdminBase
{
    
    /**
     * 仪器列表
     */
    public function classteaList()
    {
        
        $this->assign('list', $this->logicClass->getClassList());
        
        return $this->fetch('classtea_list');
    }
    
    /**
     * 仪器添加
     */
    public function classteaAdd()
    {
        
        IS_POST && $this->jump($this->logicClass->classteaEdit($this->param));
        
        return $this->fetch('classtea_edit');
    }
    
    /**
     * 仪器编辑
     */
    public function classteaEdit()
    {
        
        IS_POST && $this->jump($this->logicClass->classteaEdit($this->param));
        
        $info = $this->logicClass->getClassInfo(['id' => $this->param['id']]);
        
        $this->assign('info', $info);
        
        return $this->fetch('classtea_edit');
    }
    
    /**
     * 仪器删除
     */
    public function classteaDel($id = 0)
    {
        
        $this->jump($this->logicclasstea->classteaDel(['id' => $id]));
    }
}